window.onload=function () {

    var btnLogin = document.getElementById('btnLogin');

  //  this.location.href = "../index.html";

    btnLogin.onclick = btnLoginClick;
}


function btnLoginClick(){

    var isLoginSuccess=false;

   /*
   * if username == admin && password == 123456
   *    isLoginSuccess=true；
   * else
   *    div class="err"  用户名或者密码错误
   * */
    if(isLoginSuccess){
        //window.location.href="index.html";
         //location.href="../index.html";
         this.location.href = "../index.html"
    }

}
